<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!--
Beyond Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3
Version: 1.0.0
Purchase: http://wrapbootstrap.com
-->

<html xmlns="http://www.w3.org/1999/xhtml">
<!--Head-->
<head>
<%@ include file="/commonadmin/include/admin_include.jsp" %>

<meta name="description" content="register page" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon"
	href="<%=request.getContextPath()%>/commonadmin/assets/img/favicon.png"
	type="image/x-icon">

<!--Basic Styles-->
<link
	href="<%=request.getContextPath()%>/commonadmin/assets/css/bootstrap.min.css"
	rel="stylesheet" />
<link id="bootstrap-rtl-link" href="" rel="stylesheet" />
<link
	href="<%=request.getContextPath()%>/commonadmin/assets/css/font-awesome.min.css"
	rel="stylesheet" />

<!--Fonts-->
<link
	href="<%=request.getContextPath()%>/commonadmin/js/font-useso.js"
	rel="stylesheet" type="text/css">

<!--Beyond styles-->
<link
	href="<%=request.getContextPath()%>/commonadmin/assets/css/beyond.min.css"
	rel="stylesheet" />
<link
	href="<%=request.getContextPath()%>/commonadmin/assets/css/demo.min.css"
	rel="stylesheet" />
<link
	href="<%=request.getContextPath()%>/commonadmin/assets/css/animate.min.css"
	rel="stylesheet" />
<link id="skin-link" href="" rel="stylesheet" type="text/css" />

<!--Skin Script: Place this script in head to load scripts for skins and rtl support-->
<script
	src="<%=request.getContextPath()%>/commonadmin/assets/js/skins.min.js"></script>
</head>

<script type="text/javascript">
$(function() {
	jQuery.validator.addMethod("accunt", function(value, element){
		return this.optional(element) ||/^[a-zA-Z0-9]+$/.test(value);
		}, "只能包括英文和数字");
	var validate = $("#adminAppend").validate({
		debug : false, //调试模式取消submit的默认提交功能   
		//errorClass: "label.error", //默认为错误的样式类为：error   
		focusInvalid : false, //当为false时，验证无效时，没有焦点响应  
		onkeyup : false,
		submitHandler : function(form) { //表单提交句柄,为一回调函数，带一个参数：form   
			form.submit();
		},

		rules : {
			
			username : {
				required : true,
				rangelength : [ 5, 16 ],
				accunt : true
			},

			password : {
				required : true,
				rangelength : [ 6, 16 ]
			},

			passwordConfirm : {
				equalTo : "#password"
			}
		},
		messages : {
			
			username : {
				required : "账号不能为空",
			},
			
			password : {
				required : "密码不能为空"
			},

			passwordConfirm : {
				accunt : "账号只能是字母或数字",
				required : "确认密码不能为空"
			}
		}
		
	});
});


	
</script>
<!--Head Ends-->
<!--Body-->
<body>
	<form action="<%=request.getContextPath()%>/admin/interest/addInterest.htm" method="post" id="adminAppend" name="adminAppend">
		<div class="register-container animated fadeInDown">
			<div class="registerbox bg-white">
				<div class="registerbox-caption "></div>
				<div class="registerbox-caption "></div>
				<div class="registerbox-caption "></div>
				<div class="registerbox-title" style="text-align: center;">添加兴趣</div>

				<div class="registerbox-caption "></div>
				<div class="registerbox-caption "></div>
				<div class="registerbox-textbox">
					<input type="text" class="form-control" placeholder="兴趣名称:"
						name="name" id="name" required accunt/>
				</div>
				<div class="form-group">
				<div >主办方头像</div>
				<div >
					<a href="javascript:;"><img
						src="<%=request.getContextPath()%>/common/img/header.gif"
						width="80" height="80" id="header"  class="addHead" /></a>
				</div>
			</div>
				<div class="registerbox-caption ">
					<span id="test" style="color: red;"></span>
				</div>
				<div class="registerbox-caption ">
					
				</div>
				<div class="registerbox-submit">
					<input type="submit" class="btn btn-primary pull-left" value="添加">
				</div>
				<div class="registerbox-submit">
					<input type="button" class="btn btn-primary pull-right" value="关闭"
						onclick="window.close()">
				</div>
			</div>
		</div>
	</form>
	
	<script
		src="<%=request.getContextPath()%>/commonadmin/assets/js/bootstrap.min.js"></script>

<%@include file="/common/admin_upload_interest.jsp"%>

</body>
<!--Body Ends-->
</html>
